home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Examples / randomModels / exprTest1.mdl / model.eve
Encoding:
Text File  |  1995-03-22  |  867 b   |  30 lines

  1. set sphereCount 5
  2. set sphereRadius 1.0
  3. set sphereSpacing 2.5
  4. set sphereColor {1.0 0.0 0.0}
  5.  
  6. # if it returns 1, continue, if it returns 0, (nicely) abort the script
  7. #if {[loadControlPanelModallyAndClose simpleSpheresTest.nib]} {} {return }
  8.  
  9. loadControlPanel simpleSpheresTest2.nib
  10.  
  11. #
  12. # some useful procs...
  13. #
  14. proc startShape {shapeName} { AttributeBegin; Attribute identifier name $shapeName }
  15. #
  16. proc endShape {} { AttributeEnd }
  17. ###
  18.  
  19. startShape MamaSphere
  20.   Sphere $sphereRadius [expr {-$sphereRadius}] $sphereRadius 360
  21.   for {set i 1} {$i < $sphereCount} {incr i} \
  22.   {  startShape sphere${i}
  23.        set newX [expr {$i * $sphereSpacing}] 
  24.        Translate $newX 0 0 
  25.        # USAGE: Sphere radius zMin zMax thetaMax [parameterlist]
  26.        EveCmd {Color $sphereColor}
  27.        Sphere $sphereRadius [expr {-$sphereRadius}] $sphereRadius 360
  28.       endShape
  29.   }
  30. endShape